package DataStructure.tree;

public class BinaryTreeTest {
    public static void main(String[] args) {
        BinaryTree<Integer, String> tree = new BinaryTree<>();
        tree.put(9,"a");
        tree.put(2,"b");
        tree.put(10,"c");
        tree.put(1,"e");
        tree.put(8,"f");
        tree.put(7,"g");
        tree.put(3,"h");
        tree.put(5,"j");
        tree.put(4,"k");
        tree.put(6,"l");


        System.out.println("元素个数:"+tree.size());
        System.out.println(tree.get(3));

        tree.delete(2);


        System.out.println(tree.size());
        System.out.println("删除2对应的元素："+tree.get(2));
        System.out.println(tree.get(9));
        System.out.println(tree.get(2));
        System.out.println(tree.get(10));
        System.out.println(tree.get(1));
        System.out.println(tree.get(8));
        System.out.println(tree.get(7));
        System.out.println(tree.get(3));
        System.out.println(tree.get(5));
        System.out.println(tree.get(4));
        System.out.println(tree.get(6));

    }
}
